from pathlib import Path

path = Path('day14/pi_million_digits.txt')
contents = path.read_text()

lines = contents.splitlines()   # splitlines() 将字符串转换为一系列行
pi_srting =""
for line in lines:
    pi_srting +=line.lstrip()   # lstrip() 删除每行左端空格

print(f"{pi_srting[:52]}...")
print(len(pi_srting))

birthday = input("Enter your biryhday, in the form mmddyy: ")
if birthday in pi_srting:
    print("Your birthdy appears in the first million digits of pi!")

else:
    print("Your birthdy does not appears in the first million digits of pi!")
